#ifndef VIDEOCONTROLLER_H
#define VIDEOCONTROLLER_H

#include <QObject>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <QImage>
#include <QSize>
#include <QPixmap>
#include <QLabel>
#include "threadstream.h"

typedef cv::Mat MyArray;

class VideoController : public QObject
{
    Q_OBJECT
public:
    explicit VideoController(QLabel *label, QObject *parent = 0);
    VideoController(cv::VideoCapture &streamSource);
    ~VideoController();
    void Stop();
    bool Pause();
    void Back();
    void ReturnTodirect();
    void setImgSize(QSize &size);
    void Record();
    bool isRecording();
    bool isPlaying();
    void PlayVideo(QString fileName);
    void PlayCamera();
private:
    bool record;
    bool play;
    QSize size;
    QLabel *imgLbl;
    ThreadStream *threadStream;
    bool pause;
signals:
    void sigUpdateGUI(const QPixmap &img);
    
public slots:


};

#endif // VIDEOCONTROLLER_H
